//  -------------------- iSharePoint -------------------- //
// 
//  Company:	IT Complex, LLC
//  Project:	Smart.Common
//  File name:	IEntityMapper.cs
//  Developer:	Solomatov Igor
//  Created:	15.04.2012
// 
//  -------------------- iSharePoint -------------------- //

using System;

namespace Smart.Common.Entities
{
	/// <summary>
	/// Entity Mapper
	/// </summary>
	public interface IEntityMapper
	{
		/// <summary>
		/// Create entity
		/// </summary>
		Entity CreateEntity(Type entityType);

		/// <summary>
		/// Fill entity with default values
		/// </summary>
		bool FillEntity(Entity entity);

		/// <summary>
		/// Load entity values from source
		/// </summary>
		bool LoadEntity(object source, Entity entity);

		/// <summary>
		/// Save entity values to source
		/// </summary>
		bool SaveEntity(Entity entity, object source);
	}
}